# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=bugzilla
pkgver=5.0.6
pkgrel=5
pkgdesc="bug tracker"
arch=('any')
url="https://www.bugzilla.org"
license=("custom:MPL2")
depends=(perl perl-timedate perl-datetime perl-cgi perl-dbi
	 perl-chart perl-email-abstract perl-email-address perl-email-date-format
	 perl-email-messageid perl-email-mime perl-email-mime-attachment-stripper
	 perl-email-mime-contenttype perl-email-mime-encodings
	 perl-email-mime-modifier perl-email-mime-creator perl-email-reply perl-email-send perl-email-simple
	 perl-email-simple-creator perl-gd perl-gdgraph perl-gdtextutil perl-patchreader
	 perl-return-value perl-template-gd perl-ldap perl-soap-lite perl-authen-sasl
	 perl-xml-twig perl-html-scrubber perl-authen-radius perl-template-toolkit
	 perl-data-dumper perl-math-random-isaac perl-email-sender perl-json-xs perl-file-slurp)
optdepends=('perl-dbd-pg'
	    'perl-dbd-mysql'
	    'perl-dbd-sqlite'
	    'perl-dbd-odbc'
#	    'perl-dbd-oracle'
	    'ruby'
#	    'perl-class-trigger'
#	    'perl-data-objectdriver'
#	    'perl-html-formattext-withlinks'
#	    'perl-test-taint'
#	    'perl-theschwartz'
#	    'perl-xmlrpc-lite'
	    'perl-net-smtp-ssl')
options=(!strip)
backup=('srv/http/bugzilla/.htaccess')
source=(https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-$pkgver.tar.gz)
sha256sums=('dd41a4b0a3a1df0d193bc056f2e3711d7b5605718a00bf6e5d4177bf1be86f77')

prepare() {
  cd "$srcdir"/$pkgname-$pkgver
  rm -rf .git
  rm -rf .gitignore
  rm -rf .bzrignore
}

package() {
  install -d -m0755 "$pkgdir"/srv/http
  cp -a "$srcdir"/$pkgname-$pkgver "$pkgdir"/srv/http/bugzilla
}
